package lab02.text11;

public class Rectangle implements Printx{

    double longth;
    double width;

    double area(){
        return longth*width;
    }
    double perimeter(){
        return (longth+width)*2;
    }

    @Override
    public void printMyWay() {
        System.out.println(longth);
        System.out.println(width);
        System.out.println(area());
        System.out.println(perimeter());
    }
}
